import { fetch } from '../fetch' // 引用fetch.js

export function setActivityAction ({userTemplateId, title, activityName, playCount, description, description2, qrCode}) { // 设置活动参数
  let data = new FormData()
  data.append('userTemplateId', userTemplateId)
  data.append('title', title)
  data.append('activityName', activityName)
  data.append('playCount', playCount)
  data.append('description', description)
  data.append('description2', description2)
  data.append('qrCode', qrCode)
  return fetch({
    url: '/littlefinger/userTemplate/setUserTemplate',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

export function getActivityListAction () { // 获取活动默认参数
  return fetch({
    url: '/littlefinger/activity/getActivityList',
    method: 'get'
  })
}
